package Case01.example02;
/**
 * 圆柱类  子类   继承   圆类   父类
 * */
public class Cylinder extends Circle {

    //圆柱的体积：底面积*高
    //          圆的面积*高

    //高是圆柱独特的
    private double height;

    public Cylinder() {
        height = 1;
    }

    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    //圆柱的体积
    public double findVolume(){
        //圆的面积  来自 父类 * 高
      //  double s =3.14 *r *r*height;

        double s =dindArea()*height;
        return s;
    }
}
